/**
 * 
 */
package com.jrh.biz.area;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;

public class AreaDAO extends SqlSessionDaoSupport {

    private static final String NAMESPACE = AreaModel.class.getName();

    public AreaModel getAreaByCode(String code) {
        return (AreaModel) getSqlSession().selectOne(NAMESPACE + ".getAreaByCode", code);
    }

    @SuppressWarnings("unchecked")
    public List<AreaModel> listAreasByCode(String code) {
        return (List<AreaModel>) getSqlSession().selectList(NAMESPACE + ".listAreasByCode", code);
    }

}
